<?php
include "../../db_const.php";
include "../../connect.php";
include "../../connect_ado.php";
include "../../isa-lib/isa-function/isa_date_function.php";
include "../../isa-lib/isa-function/isa_public_function.php";

//*****************************************************************************************************************
//	V1.0	HIENMT	Kiem tra so CMND da ton tai chua
//*****************************************************************************************************************

	$cmnd = $_REQUEST['id'];
	//echo $cmnd;
	//echo "ddd";
	$tp   = $_REQUEST['type'];
	$sql = "SELECT count(*) FROM T_ONEGATE_RECORD WHERE dbo.f_GetValueOfXMLtag(C_LICENSE_XML_DATA, 'cmnd') = '".$cmnd."' AND (FK_RECORDTYPE = '001')";
	$v_result = $ado_conn->GetRow($sql);
	echo($v_result[0]);
?>